package com.chery.media.ui.setting

import androidx.fragment.app.Fragment
import com.chery.media.R
import com.chery.media.library.base.BaseViewModel
import com.chery.media.library.extend.toResString
import com.chery.media.ui.setting.brightness.BrightnessFragment
import com.chery.media.ui.setting.gps.GpsFragment
import com.chery.media.ui.setting.language.LanguageFragment
import com.chery.media.ui.setting.wlan.WlanFragment

class SettingViewModel: BaseViewModel() {

    val fragments = arrayListOf<Fragment>().apply {
        add(WlanFragment.newInstance())
        add(GpsFragment.newInstance())
        add(BrightnessFragment.newInstance())
        add(LanguageFragment.newInstance())
    }

    fun getSettingTypes() = arrayListOf<Triple<Int, Int, String>>().apply {
        add(Triple(R.drawable.svg_wifi, R.drawable.svg_wifi_selected, R.string.wlan.toResString()))
        add(Triple(R.drawable.svg_gps, R.drawable.svg_gps_selected, R.string.gps.toResString()))
        add(Triple(R.drawable.svg_brightness, R.drawable.svg_brightness_select, R.string.brightness.toResString()))
        add(Triple(R.drawable.svg_language, R.drawable.svg_language_selected, R.string.language.toResString()))
    }

}